/**
 * Copyright (C) 2013 Christos Koufogiannakis
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.easychart.demo;

import java.util.ArrayList;

import java.util.Arrays;

import com.easychart.chart.PointChart;

import android.app.Activity;
import android.os.Bundle;

/**
 * Example full screen PointChart
 */
public class ExamplePointChart extends Activity {
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
			
		ArrayList<String> xLabels =  new ArrayList<String>(
				Arrays.asList("2006","2007", "2008", "2009", "2010", "2011", "2012")); 
		
		ArrayList<Double> population1 = new ArrayList<Double>(Arrays.asList(500d, 530d, 520d, 550d, 570d, 600d, 610d));
		ArrayList<Double> population2 = new ArrayList<Double>(Arrays.asList(400d, 430d, 420d, 450d, 470d, 400d, 410d));
		ArrayList<Double> population3 = new ArrayList<Double>(Arrays.asList(600d, 570d, 580d, 580d, 600d, 630d, 640d));
		
		PointChart pointChart = new PointChart(this);
		pointChart.setXLabels(xLabels);
		pointChart.addPopulation(population1, "University A");
		pointChart.addPopulation(population2, "University B");
		pointChart.addPopulation(population3, "University C");
		pointChart.setXTile("Year");
		pointChart.setYTile("Number of Graduates");
		pointChart.setPlotTitle("Graduation records");

		setContentView(pointChart);
	}
}